Steve Lhomme [Fri, 29 Nov 2024 10:28:46 +0000 (11:28 +0100)]
demux/mp4: force the packetizer to fill AV1 extradata without optional OBUs
The hardware decoders need it and the packetizer can fill it for us.
(cherry picked from commit fe8b4bf937ad08d17d69de07ae21e9f326e2bd96) (edited)
edited:
- the extradata handling is missing many backports, adapting the to 3.0 code
Gbp-Pq: Name 0110-demux-mp4-force-the-packetizer-to-fill-AV1-extradata.patch
Steve Lhomme [Fri, 29 Nov 2024 10:57:36 +0000 (11:57 +0100)]
packetizer/av1: fill the full extradata if it doesn't have the optional OBU
The optional part needed by the decoders.
This will restart the decoders if needed, but they should have received no frames yet
or the hardware decoder may be usable again or not (after a sequence header change).
Steve Lhomme [Tue, 26 Nov 2024 05:33:48 +0000 (06:33 +0100)]
demux: mkv: don't use EbmlDummy elements coming out of FindNextID()
FindNextID() is supposed to return an element of the given type when it's found. But in some cases,
when the ID and sizes are plausible, an EbmlDummy is returned [1].
We should not use that element as if it was a legit element we're looking for.
This is especially crucial when we're opening a file to decide if it's an EBML file or not (EbmlHead).
KO Myung-Hun [Tue, 28 Feb 2023 14:47:47 +0000 (23:47 +0900)]
qt: PodcastConfiguration inherits QDialog not QWidget
Especially, accept() and reject() slots are in QDialog.
(cherry picked from commit 183acaecc1fafdfe57a3c4981702ec00561c31e0) Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
Gbp-Pq: Name 0104-qt-PodcastConfiguration-inherits-QDialog-not-QWidget.patch
avcodec: add a define to test for AVCodecContext.ch_layout availability
Co-authored-by: Steve Lhomme <robux4@ycbcr.xyz>
(cherry picked from commit 3abf93735df97cc2c96e11028b76067547c27eb7) (rebased)
rebased:
- on 3.0 the fmt_in is not a pointer
- the code around is slightly different due to the use of API_CHANNEL_LAYOUT
Gbp-Pq: Name 0096-avcodec-add-a-define-to-test-for-AVCodecContext.ch_l.patch
Steve Lhomme [Wed, 19 Jun 2024 06:36:40 +0000 (08:36 +0200)]
ffmpeg: fix libavutil version check for AVFrame.ch_layout
It was added in db6efa1815e217ed76f39aee8b15ee5c64698537 which
was libavutil 57.23.100 at the time but the minor version was not updated in
that commit so we check 57.24.100.
Steve Lhomme [Wed, 19 Jun 2024 11:41:04 +0000 (13:41 +0200)]
avcodec: fix libavcodec version check for AVCodecContext.ch_layout
It was added in 548aeb93834b8425c86d1ce60fddc1d41805724d which
was libavcodec 59.23.100 at the time but the minor version was not updated in
that commit so we check 59.24.100.
Co-authored-by: François Cartegnie <fcvlcdev@free.fr>
(cherry picked from commit 8fd918b8787b8d077decf1a2b955ab0c7b964bf3) (rebased)
rebased:
- on 3.0 fmt_in is not a pointer
Gbp-Pq: Name 0094-avcodec-fix-libavcodec-version-check-for-AVCodecCont.patch
Steve Lhomme [Tue, 18 Jun 2024 14:04:41 +0000 (16:04 +0200)]
ffmpeg: fix libavcodec version check for AVCodecParameters.ch_layout
It was added in 276c06726fbd2f784d51189870bd834e9284812f which
was libavcodec 59.23.100 at the time but the minor version was not updated in
that commit so we check 59.24.100.
Steve Lhomme [Tue, 18 Jun 2024 13:34:10 +0000 (15:34 +0200)]
ffmpeg: fix libavutil version check for av_channel_layout_default()
It was added in c41899a3770cb4510e15b223fa34d129305b1589 which
was libavutil 57.23.100 at the time but the minor version was not updated in
that commit so we check 57.24.100.
The same check applies for av_channel_layout_copy() added in the same commit.
(cherry picked from commit 41778535dcae8b145ebfaa0392de281e470a91bf) (edited)
edited:
- on 3.0 the audio check was still using a LIBAVCODEC_VERSION_CHECK check
- the mux/demux checks were already there with different spaces
Gbp-Pq: Name 0091-codec-avcodec-fix-ch_layout-requirement.patch
Steve Lhomme [Mon, 14 Oct 2024 09:11:36 +0000 (11:11 +0200)]
fetcher: don't download network metadata if the user doesn't want to
The option is defined as "Allow metadata network access". If it's false (default but query during the first run) that means the
user doesn't want to check metadata from the network.
So we should not start a network job when there's a possibility to do it.
Vikram Kangotra [Fri, 2 Feb 2024 21:22:52 +0000 (02:52 +0530)]
Taglib: Use ID3v2Tag() instead of tag() for RIFF::WAV::File
`WriteMetaToId3v2` expects a `ID3v2::Tag` instead of `Tag`, but Since TagLib v2.0,
`RIFF::WAV::File::tag()` returns a `Tag` instead of `ID3v2::Tag`, hence replace
the usage of `tag()` method with `ID3v2Tag()`.
Additionally, to resolve the compilation error, the function signatures of
`insert` and `removeBlock` have been adjusted to align with the base class
functions.
The convertion will incur a cost which we don't want to pay since the
art needs to be encoded in base64, which doesn't include anything
outside of ASCII
Warnings were happening because we were using copy operator= as the
assigned object was already initialized. This patch use the copy
constructor or move constructor instead if available.
Those warnings were:
../../modules/meta_engine/taglib.cpp: In function ‘void ReadMetaFromXiph(TagLib::Ogg::XiphComment*, demux_meta_t*, vlc_meta_t*)’:
../../modules/meta_engine/taglib.cpp:672:39: warning: implicitly-declared ‘TagLib::StringList& TagLib::StringList::operator=(const TagLib::StringList&)’ is deprecated [-Wdeprecated-copy]
672 | list = tag->fieldListMap()[keyName]; \
| ^
../../modules/meta_engine/taglib.cpp:681:5: note: in expansion of macro ‘SET’
681 | SET( "COPYRIGHT", Copyright );
| ^~~
In file included from /usr/include/taglib/fileref.h:30,
from ../../modules/meta_engine/taglib.cpp:58:
/usr/include/taglib/tstringlist.h:59:5: note: because ‘TagLib::StringList’ has user-provided ‘TagLib::StringList::StringList(const TagLib::StringList&)’
59 | StringList(const StringList &l);
| ^~~~~~~~~~
Steve Lhomme [Mon, 16 Sep 2024 11:21:17 +0000 (13:21 +0200)]
taglib: Always use IOStream to read the media
(cherry picked from commit 4bc7607f31f80264b5e61fbd187f2f8d2f3bb604) (edited)
edited:
- keep the support for taglib older than 1.11 which doesn't have the
proper FileRef constructor to use it
- the aacresolver is only called for Taglib 1.11+ on 3.0
- 4.0 doesn't make a difference for UWP or regular Windows
Gbp-Pq: Name 0035-taglib-Always-use-IOStream-to-read-the-media.patch
Thomas Guillem [Wed, 11 Sep 2024 06:16:36 +0000 (08:16 +0200)]
packetizer: dts: check for frame_size for the first sync
Only substreams are allowed to have a frame_size of 0.
(cherry picked from commit 16b31aa57e3919dbe661c213868dee4b8bc1e3bd) Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Gbp-Pq: Name 0030-packetizer-dts-check-for-frame_size-for-the-first-sy.patch
Thomas Guillem [Wed, 11 Sep 2024 06:15:52 +0000 (08:15 +0200)]
dts_header: initialize SUBSTREAM_LBR size to 0
It's a substream and can't work alone, so a size of 0 is legitimate.
Fixes #28773 (Use of uninitialised value)
(cherry picked from commit b23f09b258dc63c2221af502ec856630f68817e5) Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Gbp-Pq: Name 0029-dts_header-initialize-SUBSTREAM_LBR-size-to-0.patch
Mangal Kushwah [Fri, 9 Aug 2024 14:00:05 +0000 (19:30 +0530)]
codec: videotoolbox: remove sw decoder fallback for mp4v
commit 7a2bf498d545d500d30636970fa930eb54de5569 insert packetizer for
xvid mpeg4 video, so now hw decoder can decode xvid encoded video
without any playback issues.
Mangal Kushwah [Thu, 8 Aug 2024 16:00:19 +0000 (21:30 +0530)]
demux: AVI insert packetizer for XVID MPEG-4 video
Older DivX-encoded videos commonly use an method called packed
bitstream which puts several video frames into a single AVI chunk.
Since Packed bitstream isn't standard MPEG-4 it causes playback issues
with some hw decoders.
Steve Lhomme [Thu, 18 Jul 2024 07:27:00 +0000 (09:27 +0200)]
opencv: check the image conversion worked
Otherwise we release the output picture that would have been used and returned.
(cherry picked from commit 19813291fcfb31ddd91a2e4d0f1d37ad3239d300) (rebased)
rebased:
- p_filter->p_sys is p_sys on 4.0 Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
Gbp-Pq: Name 0019-opencv-check-the-image-conversion-worked.patch
Steve Lhomme [Thu, 18 Jul 2024 07:23:58 +0000 (09:23 +0200)]
magnify: check the image conversion worked
return NULL on failure as we cannot produce the required output.
Fixes #28707
(cherry picked from commit 990de75bc0a7db5f2c4e4cb88e868b75b689ac7d) (rebased)
rebased:
- picture_CopyPixels is called picture_CopyVisiblePixels on 4.0 Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
Gbp-Pq: Name 0018-magnify-check-the-image-conversion-worked.patch
Maxime Even [Mon, 8 Jul 2024 15:51:14 +0000 (17:51 +0200)]
spectrogram: allows better visualization of low frequencies
In some cases, Y which represents the height of a column was equal to 1
and therefore when passed through the log, the output displayed was
zero, by adding this 0.1, this allows you to see a column when y = 1
without really changing the height of each column
Maxime Even [Mon, 8 Jul 2024 15:41:39 +0000 (17:41 +0200)]
spectrogram: convert int16 to unsigned for correct range
p_dest is used to set the height of the column, and it is used
as a variable defined from zero to 2^16 - 1. It is therefore
considered in the rest of the program as an unsigned int 16.
Moreover, the value that we put inside are a sum of two squared
real value, so they are necessarily positive.
Maxime Even [Tue, 9 Jul 2024 11:20:25 +0000 (13:20 +0200)]
spectrogram: fix FFT result scaling factor
This function is just a scaling operation that passes a value between 0 and
FFT_SCALING_VALUE to a value between 0 and 2^16-1.
It is therefore a power that must be applied here and not a xor.
Moreover, the initial formula was quite wrong since it was assuming that the max_input
value, which is a signed int 16, was 2^15 = 32768 where it is in fact 2^15-1=32767.
Moreover, the initial formula wasn't taking into account that, since the
output of the fft_perform is the sum of two variables which have for max value
(FFT_BUFFER_SIZE / 2 * INT16_MAX)^2, then we need to multiply the final max
value by 2.
Corrects the following compiler warnings:
visualization/glspectrum.c:528:43: warning: result of ‘2^16’ is 18; did you mean ‘1 << 16’ (65536)? [-Wxor-used-as-pow]
visualization/visual/effects.c:216:40: warning: result of ‘2^16’ is 18; did you mean ‘1 << 16’ (65536)? [-Wxor-used-as-pow]
When introducing SAT>IP support, we added a fallback mechanism on
officially published channel lists in case the user neither specified
a custom list nor the used set-top box provided one.
With the end of the SAT>IP Alliance that was dissolved 3 years ago, the
fallback server is no longer available and there will be no replacement
so this feature was removed.